﻿using Ebusiness_ProductService.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Ebusiness_ProductService.Model.config
{
    public class ProductConfig : IEntityTypeConfiguration<Product>
    {
        public void Configure(EntityTypeBuilder<Product> builder)
        {
            //builder.Property("passwordHash");
            //builder.Property(e => e.Remark).HasField("remark");
            //builder.Ignore(e => e.Tag); //忽略属性

            builder.OwnsOne(x => x.Geo);
        }
    }
}
